//
//  OCDeviceService.h
//  VideoTeleprompter
//
//  Created by Duncan on 2021/4/16.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface OCDeviceService : NSObject

+ (instancetype)share;

/// 跳转app系统设置
+ (void)openUIApplicationOpenSettingsURLString;
/// 跳转App Store评论
+ (void)openUIApplicationWriteReviewString;
/// 提示没有相册权限
+ (void)showTipsWithPhotosRequestAuthorization;

/// 系统分享链接
+ (void)shareWithUrlStiring:(NSString *)urlString;
/// 系统分享文件
+ (void)shareWithFileStiring:(NSString *)fileString;

/// 打开QQ聊天界面
+ (void)openQQWithQQNumber:(NSString *)qqNumber;

/// 添加QQ群
+ (void)addQQGroupWithNumber:(NSString *)number;
/// 复制字符串
+ (void)copyWithString:(NSString *)string;


/// 震动
+ (void)feedbackGenerator;


#pragma mark ------- txt -------

/// 导出txt
+ (void)daochuTxtWithString:(NSString *)content;
/// 提取txt文件内容
+ (NSString *)extractTextContentWithFilePaht:(NSString *)filePath;

#pragma mark ------- 保存图片 -------

/// 保存图片
- (void)saveImageToAlbumWithNameimage:(UIImage *)image;
/// 保存本地gif图
- (BOOL)savedToPhotosAlbum:(NSString *)path;

#pragma mark ------- 视频保存到相册 -------

/// 本地视频保存到相册
- (void)saveVideoWithVideoPath:(NSString *)videoPath handle:(void(^)(BOOL success, NSError *error))saveHandle;

/// 保存网络视频到相册
- (void)saveNetworkingVideoWithString:(NSString *)urlString handle:(void(^)(BOOL success, NSError *error))saveHandle;

/// 获取视频的首帧图片
- (UIImage *)getVideoFirstImageWith:(NSString *)videoString;
- (UIImage *)getVideoThumbnailForPath:(NSString *)path;

#pragma mark ------- 播放视频 -------

- (void)avPlayWithUrl:(NSURL *)url;


@end

NS_ASSUME_NONNULL_END
